//
//  MLZPlayLastViewCell.m
//  MotherLover
//
//  Created by zj on 16/1/1.
//  Copyright © 2016年 zj. All rights reserved.
//

#import "MLZPlayLastViewCell.h"

@implementation MLZPlayLastViewCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        
        
        //图片
        _imageIco = [[UIImageView alloc]initWithFrame:CGRectMake(TLandR, TTandB, (KW - TLandR*3)/3,(KW - TLandR*3)/3)];
        //_imageIco.backgroundColor = [UIColor blackColor];
        //[_imageIco.layer setCornerRadius:((KW - TLandR*3)/3)/2];
        _imageIco.layer.masksToBounds = YES;
        [self.contentView addSubview:_imageIco];
        //标题
        _lableTitle = [[UILabel alloc]initWithFrame:CGRectMake(_imageIco.right+TLandR, TTandB, ((KW - TLandR*3)/3), 30)];
        //        _lableTitle.backgroundColor = [UIColor blackColor];
        _lableTitle.font = [UIFont systemFontOfSize:20];
        _lableTitle.adjustsFontSizeToFitWidth = YES;
        _lableTitle.textAlignment = NSTextAlignmentCenter;
        //        _lableTitle.textColor = [UIColor grayColor];
        [self.contentView addSubview:_lableTitle];
        
        //内容
        _lableContent = [[UILabel alloc]initWithFrame:CGRectMake(_lableTitle.frame.origin.x, _lableTitle.frame.origin.y+_lableTitle.frame.size.height+TTandB, _lableTitle.width, _imageIco.height - _lableTitle.height - TTandB)];
        _lableContent.font = [UIFont systemFontOfSize:20];
        _lableContent.numberOfLines= -1;
        _lableContent.textAlignment = NSTextAlignmentCenter;
        //        _lableContent.backgroundColor = [UIColor redColor];
        _lableContent.textColor = [UIColor grayColor];
        [self.contentView addSubview:_lableContent];
        
        
        //往左的箭头
        _imageJT = [[UIImageView alloc]initWithFrame:CGRectMake((_lableContent.frame.origin.x+_lableContent.width+TLandR*2), (150 - _imageIco.width/2)/2, _imageIco.width/2, _imageIco.height/2)];
        _imageJT.image = [UIImage imageNamed:@"bofang"];
        [self.contentView addSubview:_imageJT];
        
        
    }
    return self;
    
}

- (void)setModel:(MLZPlistLastModel *)model{

    [_imageIco sd_setImageWithURL:[NSURL URLWithString:model.icon_140X105.url]];
    _lableContent.text = model.name;




}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
